<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户管理</title>
  <link th:href="@{/css/style.css}" rel="stylesheet" type="text/css" />
  <script type="text/javascript" th:src="@{/js/jquery.js}"></script>

<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>营销管理</li>
    <li>订购单审核管理</li>
    <li>基本内容</li>
  </ul>
</div>
<div class="rightinfo">
  <form action="/erp1/market/orderExamine/orderExamineAll" method="post" id="form">
    <input type="hidden" name="pageno" value="1" id="pageno"/>
    <ul class="tools">
      <li> 订单编号:
        <input type="text" name="orderid" th:value="${orders.orderid}"/>
      </li>
      <li> 客户姓名:
        <input type="text" name="custom.customname" th:value="${orders.custom!=null?orders.custom.customname:''}"/>
      </li>
      <li> 订购时间:
        <input type="date" name="ordertimemin" th:value="${ordertimeMin}" /> -
        <input type="date" name="ordertimemax" th:value="${ordertimeMax}" />
      </li>
      <li> 金额:
        <input type="text" class="stinput" name="ordermoneyMin"  th:value="${ordermoneyMin}"/> -
        <input type="text" class="stinput" name="ordermoneyMax " th:value="${ordermoneyMax}"/>
      </li>
      <li class="subBut" onclick="goPage(1)"><img th:src="@{/images/t06.png}"  />查询</li>
    </ul>
    <table class="tablelist">
      <thead>
        <tr>
          <th>序号</th>
          <th>订单编号</th>
          <th>客户姓名</th>
          <th>联系电话</th>
          <th>订购时间</th>
          <th>金额</th>
          <th>操作人</th>
          <th>审核状态</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
      <tr th:each="o,var : ${Opinfo.list}">
          <td th:text="${(Opinfo.pageNum-1)*Opinfo.pageSize+var.count}">1</td>
          <td th:text="${o.orderid}">DJ201701270001</td>
          <td th:text="${o.custom.customname}">王金平</td>
          <td th:text="${o.custom.telephone}">17370899727</td>
          <td th:text="${#dates.format(o.ordertime,'yyyy/MM/dd')}">2017-01-25 15:05:05</td>
          <td th:text="${o.ordermoney}">￥9,876,582</td>
          <td th:text="${o.operatorUser.uname}">关羽</td>
          <td>审核中</td>
          <td>
            <a th:href="@{'/market/orderExamine/goAuditOrders?orderid='+${o.orderid}}" class="tablelink">审核</a>
          </td>
        </tr>
      </tbody>
    </table>
    <div class="pagin">
      <div class="message">共<i class="blue" th:text="${Opinfo.total}"></i>条记录，当前显示第&nbsp;<i class="blue" th:text="${Opinfo.pageNum}">2&nbsp;</i>页</div>
      <ul class="paginList">
        <li class="paginItem">
          <a href="javascript:void(0);" th:onclick="goPage([[${Opinfo.isFirstPage?1:Opinfo.pageNum-1}]])">
            <span th:class="${Opinfo.isFirstPage?'pagepre':'pagenxt roate'}"></span>
          </a>
        </li>

        <li th:class="${page==Opinfo.pageNum?'paginItem current':'paginItem'}"
            th:each="page : ${Opinfo.navigatepageNums}">
          <a href="javascript:;"  th:text="${page}" th:onclick="goPage([[${page}]])">1</a>
        </li>

        <li class="paginItem">
          <a href="javascript:void(0);" th:onclick="goPage([[${Opinfo.isLastPage?Opinfo.pages:Opinfo.pageNum+1}]])">
            <span th:class="${Opinfo.isLastPage?'pagepre roate':'pagenxt'}"></span>
          </a>
        </li>
      </ul>
    </div>
  </form>
</div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
    function goPage(num) {
      // alert(num);
      $("#pageno").val(num);
      $("#form").submit();
    }
</script>
</body>
</html>
